<?php
/*由bean脚本生成 powerBy--joe*/

namespace app\common\enum;

class UserRechargeStatusEnum extends BaseEnumAbtract
{
    //1 未支付，2取消支付，3支付成功
    const WAITPAY = 1;
    const CANCELPAY = 2;
    const SUCCESSPAY = 3;

    /**
     * @desc 根据类型获取对应名称
     * @param $type
     * @return mixed
     */
    public static function getName($type)
    {
        // TODO: Implement getName() method.

        $type = intval($type);
        $arrayName = self::getArrayName();
        return isset($arrayName[$type]) ? $arrayName[$type] : '状态出错';

    }

    /**
     * @desc 获取类型、名称数组
     * @return mixed
     */
    public static function getArrayName()
    {
        // TODO: Implement getName() method.

        return [
            self::WAITPAY => '未支付',
            self::CANCELPAY => '取消支付',
            self::SUCCESSPAY => '支付成功'
        ];

    }
}